class Category < ActiveRecord::Base
  belongs_to :category
  has_many :categories
  validates_presence_of :name
  validates_uniqueness_of :name
  
  class << self
    
    def find_roots
      find( :all, :conditions => { :category_id => nil } )
    end
    
  end
  
end
